<template>
  <div class="top">
    <span @click="returngo" class="red" v-show="xs">
      编辑
    </span>
    <span @click="returnto" class="red" v-show="yc">
      完成
    </span>
    <span>购物车</span>
    <span> </span>
  </div>
</template>

<script>
export default {
  data() {
    return {
      xs: true,
      yc: false,
    };
  },
  mounted() {},
  methods: {
    returngo() {
      this.xs = false;
      this.yc = true;
    },
    returnto() {
      this.xs = true;
      this.yc = false;
    },
  },
};
</script>

<style lang="scss" scoped>
.top {
  width: 100%;
  display: flex;
  -webkit-box-align: center;
  align-items: center;
  justify-content: space-between;
  height: 1rem;
  border-bottom: 1px solid #e9e9e9;
  background: white;
  // padding: 0 0.13rem;
  font-size: 0.2rem;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 123;
  .red {
    color: red;
  }
}
</style>
